/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
*/
package meta

import (
	"github.com/rs/zerolog/log"
	"github.com/spf13/cobra"
	"satellite/app/meta"
)

// clearCmd represents the mgrMeta command
var clearCmd = &cobra.Command{
	Use:     "clear",
	Aliases: []string{"/c"},
	Short:   "清理mgr的meta资源中的记录",
	Long:    `清理mgr的meta资源中的记录`,
	Args:    Args,
	Run: func(cmd *cobra.Command, args []string) {
		s := meta.NewClear(clearOption).WithBase(base)
		err := s.Run()
		if err != nil {
			log.Warn().Err(err).Send()
		}
	},
}
var (
	clearOption = new(meta.ClearOption)
)

func init() {
	metaCmd.AddCommand(clearCmd)
	clearCmd.Flags().BoolVarP(&clearOption.IsForce, "force", "f", false, "强制执行")
}
